package com.hanfu.ucenter.web.web.param.union;

import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * Created by dufei on 19/9/19.
 */
@Data
@ToString
public abstract class UnionDto implements Serializable {

    /**
     * 服务名称
     */
    protected String service;

    /**
     * 请求时间 20180302192030
     */
    protected String request_date;

    /**
     * 请求流水号不超过30位
     */
    protected String request_seq;

    public UnionDto(String service) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
        String dateTime = sdf.format(Calendar.getInstance().getTime());
        setRequest_date(dateTime);
        setRequest_seq(String.valueOf(System.currentTimeMillis()));
        this.service = service;
    }
}
